//
//  NQLeftMenuCell.m
//  ZLFastDoctor
//
//  Created by 李岚清 on 16/5/22.
//  Copyright © 2016年 LS. All rights reserved.
//

#import "NQLeftMenuCell.h"

@interface NQLeftMenuCell ()

@property (nonatomic, strong) UIImageView *indictView;

@end

@implementation NQLeftMenuCell
#pragma mark - set/get
- (void)setTitle:(NSString *)title{
    _title = title;
    //赋值子控件数据
    self.textLabel.text = title;
}

#pragma mark - 重写构造方法
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    return self;
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder{
    if (self = [super initWithCoder:aDecoder]) {
        [self setupUI];
    }
    return self;
}

#pragma mark - 添加子控件及约束
- (void)setupUI{
    //设置cell背景颜色
    self.backgroundColor = NQColor(255, 255, 255);
    //添加到view自身上
    [self addSubview:self.indictView];
    //设置frame
    self.indictView.frame = CGRectMake(NQScreenW*0.6-15, 15, 15, 15);
}

#pragma mark - 懒加载子控件
- (UIImageView *)indictView{
    if (_indictView == nil) {
        _indictView = [[UIImageView alloc] init];
        _indictView.image = [UIImage imageNamed:@"steparr"];
    }
    return _indictView;
}


@end
